package cn.wjc.demo.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("partner")

@JsonInclude(JsonInclude.Include.NON_NULL)
public class Partner implements Serializable {

    @TableField("p_name")
    private String pName;

    @TableField("p_sex")
    private String pSex;

    @TableField("p_birth")
    private LocalDateTime pBirth;

    @TableField("p_age")
    private Integer pAge;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime pBirthStart;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime pBirthEnd;

}
